package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class UserJobRegistration {
    /**
     * 用户兼职编号
     */
    private int ujrId;
    /**
     * 用户编号（外键）
     */
    private int uId;
    /**
     * 用户兼职昵称
     */
    private String ujrNickName;
    /**
     * 职位发布编号（外键）
     */
    private int jrId;
    /**
     * 招聘时间
     */
    private Date createdAt;
    /**
     * 招聘状态
     */
    private int status;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public UserJobRegistration() {}
    public UserJobRegistration(int ujrId, int uId, String ujrNickName, int jrId, Date createdAt, int status, Date createTime, int state) {
        this.ujrId = ujrId;
        this.uId = uId;
        this.ujrNickName = ujrNickName;
        this.jrId = jrId;
        this.createdAt = createdAt;
        this.status = status;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("ujrId","ujr_id");
        map.put("uId","u_id");
        map.put("ujrNickName","ujr_nick_name");
        map.put("jiId","ji_id");
        map.put("createdAt","created_at");
        map.put("status","status");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getUjrId() {
        return ujrId;
    }

    public void setUjrId(int ujrId) {
        this.ujrId = ujrId;
    }

    public int getuId() {
        return uId;
    }

    public void setuId(int uId) {
        this.uId = uId;
    }

    public String getUjrNickName() {
        return ujrNickName;
    }

    public void setUjrNickName(String ujrNickName) {
        this.ujrNickName = ujrNickName;
    }

    public int getJrId() {
        return jrId;
    }

    public void setJrId(int jrId) {
        this.jrId = jrId;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印用户职位报名表
     * @return
     */
    @Override
    public String toString() {
        return "UserJobRegistration{" +
                "ujrId=" + ujrId +
                ", uId=" + uId +
                ", ujrNickName='" + ujrNickName + '\'' +
                ", jrId=" + jrId +
                ", createdAt=" + createdAt +
                ", status=" + status +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
